package com.jielin.handling.mapper.record;

import com.jielin.handling.entity.record.RecordApply;
import com.jielin.handling.entity.vo.record.RecordApplyParams;
import com.jielin.handling.entity.vo.record.RecordApplyVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 笔录申请查看
 *
 * @author WR
 * @date 2020/10/13
 */
public interface RecordApplyMapper {
    /**
     * [新增]
     *
     * @author WR
     * @date 2020/10/13
     **/
    int insert(RecordApply recordApply);

    /**
     * [刪除]
     *
     * @author WR
     * @date 2020/10/13
     **/
    int delete(int id);

    /**
     * [更新]
     *
     * @author WR
     * @date 2020/10/13
     **/
    int update(RecordApply recordApply);

    /**
     * [查询] 根据主键 id 查询
     *
     * @author WR
     * @date 2020/10/13
     **/
    RecordApply load(int id);

    /**
     * [查询] 分页查询
     *
     * @author WR
     * @date 2020/10/13
     **/
    List<RecordApply> pageList(int offset, int pagesize);

    /**
     * [查询] 分页查询 count
     *
     * @author WR
     * @date 2020/10/13
     **/
    int pageListCount(int offset, int pagesize);

    /**
     * 查询个人/他人申请
     *
     * @param recordApplyParams
     * @return
     */
    List<RecordApplyVo> findRecordApply(RecordApplyParams recordApplyParams);

    /**
     * 查询申请信息
     *
     * @param id
     * @param policeId
     * @return
     */
    RecordApply findRecordApplyByPoliceId(@Param("id") String id, @Param("policeId") String policeId);
}
